* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.controls {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: bold;
    min-width: 80px;
}

select, input[type="range"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: #667eea;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

button:hover:not(:disabled) {
    background: #5a6fd8;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.visualization-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#canvas {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #fafafa;
}

.stats {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 10px;
}

.stat-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #666;
}

.stat-item span:last-child {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: space-between;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
    }
    
    #canvas {
        width: 100%;
        height: 300px;
    }
}